package vip.ifmm.lehouse.commodity.service.api.mock;

import com.github.pagehelper.PageInfo;
import vip.ifmm.lehouse.commodity.service.api.CommodityTypeService;
import vip.ifmm.lehouse.common.dto.ServerResponse;
import vip.ifmm.lehouse.common.enums.CommonStatus;
import vip.ifmm.lehouse.common.model.CommodityType;

import java.util.Collections;

/**
 * @author Fish
 * <p>Email: fishinlove@163.com</p>
 * <p>created by 2019/06/22 15:16:02</p>
 */
public class CommodityTypeServiceMock implements CommodityTypeService {

    @Override
    public ServerResponse<Void> saveCommodityType(CommodityType commodityType) {
        return ServerResponse.response(CommonStatus.SERVICE_IS_UNAVAILABLE);
    }

    @Override
    public ServerResponse<Void> updateCommodityType(CommodityType commodityType) {
        return ServerResponse.response(CommonStatus.SERVICE_IS_UNAVAILABLE);
    }

    @Override
    public ServerResponse<Void> deleteCommodityType(CommodityType commodityType) {
        return ServerResponse.response(CommonStatus.SERVICE_IS_UNAVAILABLE);
    }

    @Override
    public ServerResponse<PageInfo<?>> listCommodityTypes(int pageNum,
                                                          int pageSize,
                                                          boolean needPaged) {
        return ServerResponse.response(CommonStatus.SERVICE_IS_UNAVAILABLE,
                new PageInfo<>(Collections.emptyList()));
    }

    @Override
    public ServerResponse<CommodityType> getCommodityType(int commodityTypeId) {
        return ServerResponse.response(CommonStatus.SERVICE_IS_UNAVAILABLE);
    }
}
